@extends('admin.layouts.app')
@section('css')
  <link href="{{asset('assets/plugins/responsive-table/css/rwd-table.min.css')}}" rel="stylesheet" type="text/css" media="screen">
@endsection
@section('content')


						<!-- Page-Title -->
						<div class="row">
							<div class="col-sm-12">
                                <div class="btn-group pull-right m-t-15">
                                    <button type="button" class="btn btn-default dropdown-toggle waves-effect waves-light" data-toggle="dropdown" aria-expanded="false">Settings <span class="m-l-5"><i class="fa fa-cog"></i></span></button>
                                    <ul class="dropdown-menu drop-menu-right" role="menu">
                                        <li><a href="#">Action</a></li>
                                        <li><a href="#">Another action</a></li>
                                        <li><a href="#">Something else here</a></li>
                                        <li class="divider"></li>
                                        <li><a href="#">Separated link</a></li>
                                    </ul>
                                </div>

								<h4 class="page-title">Responsive Table</h4>
								<ol class="breadcrumb">
									<li>
										<a href="#">Ubold</a>
									</li>
									<li>
										<a href="#">Tables</a>
									</li>
									<li class="active">
										Responsive Table
									</li>
								</ol>
							</div>
						</div>
						
						
						
						<div class="row">
							<div class="col-lg-12">
								<div class="panel panel-border panel-info">
									<div class="panel-heading">
										<h3 class="panel-title">用户信息</h3>
									</div>
									<div class="panel-body">
										<p>
											昵称：{{$user->nickname}} ，电话：{{$user->phone}}，
											账户余额：
											 共有优惠券<span class="label label-success"> {{$list->count()}}
											</span> 张，
											 其中未用：
											<span class="label label-info"> {{$unUsed}} 张</span> 
											 已用：
											<span class="label label-danger"> {{$used}} 张</span> 
										</p>
									</div>
								</div>
							</div>
							<div class="col-sm-12">

								<div class="panel panel-border panel-default">
									<div class="panel-heading">
										<h3 class="panel-title">优惠券</h3>
									</div>
									<div class="panel-body">

										<div class="table-responsive" >
											<table  class="table">
												<thead>
													<tr>
	<th>ID</th>
	
	<th>优惠券</th>
	
	<th>店铺</th>
	<th>状态</th>
	<th>领取时间</th>

													</tr>
												</thead>
												<tbody>
            @foreach($list as $v)  
			<tr>
			<td>{{$v->id}}</td>

			
			<td>{{$v->coupon->name or ''}}</td>
			<td>{{object_get($v,'shop.name')}}</td>
			
			<td>
				<span class="label label-{{$v->is_used==0?'info':'danger'}}"> 
					{{$v->is_used==0?'未用':'已用'}}
				</span>
			</td>
			<td>{{$v->created_at}}</td>
														
			</tr>
            @endforeach
													
												</tbody>
											</table>
										</div>
{{$list->links()}}
									</div>

								</div>
							</div>
						</div>
						<!-- end row -->
 @endsection 
               
         

    @section('js')
        <!-- responsive-table--> 
        <script src="{{asset('assets/plugins/responsive-table/js/rwd-table.min.js')}}" type="text/javascript"></script>
    @endsection    

